package com.montran.readXML;

import java.io.File;

import com.thoughtworks.xstream.XStream;

public class TestReadXML {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		XStream xstream = new XStream();
		xstream.alias("comments", Comments.class);
		xstream.alias("comment", Comment.class);
		xstream.addImplicitCollection(Comments.class, "comments");
		File file = new File("file.xml");
		Comments comments = (Comments) xstream.fromXML(file);
		for (Comment c:comments.getComments()){
			System.out.println("c:"+c);
		}
		
	}

}
